import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;

/**
 * @Author GocChin
 * @Date 2021/7/27 13:39
 * @Blog: itdfq.com
 * @QQ: 909256107
 * @Description:
 */
public class Demo {
    public static void main(String[] args) {

            // 将日期转化为字符串
            LocalDateTime now = LocalDateTime.now();
            DateTimeFormatter formatter2 = DateTimeFormatter.ofPattern("yyyy年MM月dd日 hh:mm:ss");
            System.out.println(now.format(formatter2));

    }


}
